//
//  MyselfViewController.m
//  UI02_homework
//
//  Created by Hanlingyu on 16/7/22.
//  Copyright © 2016年 ltq. All rights reserved.
//

#import "MyselfViewController.h"
#import "ViewController.h"
#define kScreenWidth [UIScreen mainScreen].bounds.size.width
#define kScreenHeight [UIScreen mainScreen].bounds.size.height
@interface MyselfViewController ()

@property (nonatomic, strong) UIButton *button;
@property (nonatomic, strong) UIView *backgroundView;

@property (nonatomic, strong) UILabel *registLabel;
@property (nonatomic, strong) UILabel *textlabel;
@property (nonatomic, strong) UIImageView *lang1;
@property (nonatomic, strong) UIImageView *lang2;

@end

@implementation MyselfViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.backgroundView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight / 3 + 50)];
    _backgroundView.backgroundColor = [UIColor colorWithRed:47 / 255.0 green:242 / 255.0 blue:148 / 255.0 alpha:1.000];
    [self.view addSubview:_backgroundView];
    
    
    self.button = [UIButton buttonWithType:UIButtonTypeCustom];
    _button.backgroundColor = [UIColor redColor];
    [_button setImage:[UIImage imageNamed:@"setting_protrait_default"] forState:UIControlStateNormal];
    _button.frame = CGRectMake(0, 0, 70, 70);
    _button.center = CGPointMake(kScreenWidth / 2, 150);
    _button.layer.cornerRadius = 35;
    _button.layer.masksToBounds = YES;
    [_backgroundView addSubview:_button];
    [_button addTarget:self action:@selector(clickAction:) forControlEvents:UIControlEventTouchUpInside];
    
    self.registLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 30)];
    _registLabel.center = CGPointMake(kScreenWidth / 2, 220);
    _registLabel.backgroundColor = [UIColor clearColor];
    _registLabel.textAlignment = 1;
    _registLabel.text = @"登录 / 注册";
    _registLabel.font = [UIFont systemFontOfSize:16 weight:2];
    _registLabel.textColor = [UIColor whiteColor];
    [_backgroundView addSubview:_registLabel];
    
    
    self.textlabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 20)];
    _textlabel.center = CGPointMake(kScreenWidth / 2, 245);
    _textlabel.backgroundColor = [UIColor clearColor];
    _textlabel.text = @"职场从来没有过客";
    _textlabel.textAlignment = 1;
    _textlabel.textColor = [UIColor whiteColor];
    _textlabel.font = [UIFont systemFontOfSize:12];
    [self.view addSubview:_textlabel];
    
    
////    self.lang1.image = [UIImage imageNamed:@"qidongye_lang"];
//
//    
//    self.lang1 = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth * 3 / 2, 50)];
//    _lang1.backgroundColor = [UIColor redColor];
////    self.lang1.image = [UIImage imageNamed:@"qidongye_lang"];
//    self.lang1.center = CGPointMake(kScreenWidth / 2, kScreenHeight / 3 + 50 + 25);
//    [self.backgroundView addSubview:self.lang1];
//    
//    self.lang2 = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth * 3 / 2, 50)];
//    _lang1.backgroundColor = [UIColor blueColor];
////    self.lang2.image = [UIImage imageNamed:@"qidongye_lang"];
//    self.lang2.center = CGPointMake( - kScreenWidth, kScreenHeight / 3 + 50 + 25);
//    [self.backgroundView addSubview:self.lang2];
    
    
    
    
    
    
}

- (void)clickAction:(UIButton *)button {
    ViewController *vc = [[ViewController alloc] init];
    UINavigationController *naVC = [[UINavigationController alloc] initWithRootViewController:vc];
    [self presentViewController:naVC animated:YES completion:^{
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
